package com.nbcb.service.impl;

import com.nbcb.api.UserControl;
import com.nbcb.dao.UserDao;
import com.nbcb.domain.User;
import com.nbcb.service.UserService;

import java.util.UUID;

/**
 * 用户逻辑实现
 */
public class UserServiceImpl implements UserService {

    UserDao userDao;

    @Override
    public Boolean registerUser(User user) {
        if (user.getName() == null)
            return false;

        user.setId(UUID.randomUUID().toString());

        boolean f = userDao.save(user);
        return f;
    }
}
